home *** CD-ROM | disk | FTP | other *** search
/ Beginning Mac Programming / Beginning Mac Programming.bin / pc / Open Me for REALbasic 3 / REALbasic 3.2 / Goodies / REAL Software / REALbasic Plug-ins SDK / Includes / rb_plugin.h < prev    next >
Encoding:
Text File  |  2001-01-03  |  9.4 KB  |  339 lines

  1. // rb_plugin.h
  2. //
  3. // This file is part of the REALbasic plugin API.  Include this file
  4. // at the top of your plugin source files.
  5. //
  6. // © 1997-2000 REAL Software Inc. -- All Rights Reserved
  7. //
  8. // Document Scope: Win32 Plugins
  9. // Document Author: ?
  10. // Document Contributor(s): G. Cortis Clark (GCC)
  11. //
  12. // Revision History:
  13. //    Oct 20 2000 -- GCC (1)  Prefix all calls to QuickTime code with QT.  The namespace was 
  14. //                            introduced in WinHeader.h to prevent problems with conflicts in RB 
  15. //                            code. The QT namespace on Mac Targets is ignored.
  16.  
  17. #ifndef RB_PLUGIN_H
  18. #define RB_PLUGIN_H
  19.  
  20. #if !WIN32    // Oct 20 2000 -- GCC (1) -- Start
  21. #define QT
  22. #endif         // Oct 20 2000 -- GCC (1) -- End
  23.  
  24. #include "REALplugin.h"
  25.  
  26. // picture types and description
  27. enum {
  28.     pictureUnknown,
  29.     pictureMacintoshPICT,
  30.     pictureMacintoshCICN,
  31.     pictureMacintoshIconSuite,
  32.     pictureMacintoshGWorld
  33. };
  34.  
  35. struct REALpictureDescription
  36. {
  37.     long pictureType;
  38.     void *pictureData;
  39.     long width, height;
  40. };
  41.  
  42. // Sound types and description
  43. enum {
  44.     soundUnknown,
  45.     soundMacintoshSnd
  46. };
  47.  
  48. struct REALsoundDescription
  49. {
  50.     long soundType;
  51.     void *soundData;
  52. };
  53.  
  54. // handy macros
  55. #define ControlData(defn, instance, typeName, data) typeName *data = (typeName *) REALGetControlData(instance, &defn)
  56. #define ClassData(defn, instance, typeName, data) typeName *data = (typeName *) REALGetClassData(instance, &defn)
  57.  
  58. // socket constants
  59. #define socketEventConnect 1
  60. #define socketEventError 2
  61. #define socketEventDataReceived 4
  62. #define socketEventSendComplete 8
  63.  
  64. // **** Autogenerated code from Plugin API Manager follows ****
  65. // *************** Do not edit below this line ****************
  66.  
  67. #if TARGET_68K || TARGET_PPC
  68. QDGlobals *REALQDGlobals(void);
  69. #endif
  70.  
  71. #if TARGET_68K || TARGET_PPC || TARGET_CARBON
  72. int REALallocateMenuID(void);
  73. #endif
  74.  
  75. Boolean REALinRuntime(void);
  76.  
  77. #if TARGET_68K || TARGET_PPC || TARGET_CARBON
  78. void REALreleaseMenuID(int id);
  79. #endif
  80.  
  81. void GraphicsDrawLine(REALgraphics graphicsObject, int x1, int y1, int x2, int y2);
  82.  
  83. void REALRegisterMethod(REALmethodDefinition *defn);
  84.  
  85. void REALRegisterControl(REALcontrol *defn);
  86.  
  87. void REALRegisterClassExtension(REALclassDefinition *defn);
  88.  
  89. void REALRegisterDBEngine(REALdbEngineDefinition *defn);
  90.  
  91. void REALRegisterDBTable(REALdbTableDefinition *defn);
  92.  
  93. void REALRegisterDBCursor(REALdbCursorDefinition *defn);
  94.  
  95. void REALRegisterClass(REALclassDefinition *defn);
  96.  
  97. const char *REALCString(REALstring str);
  98.  
  99. const unsigned char *REALPString(REALstring str);
  100.  
  101. REALstring REALInterpretConstantValue(REALstring value);
  102.  
  103. REALstring REALDefaultControlFont(void);
  104.  
  105. REALstring REALDefaultControlCaption(void);
  106.  
  107. unsigned long REALDefaultControlFontSize(void);
  108.  
  109. REALstring REALBuildString(const char *contents, int length);
  110.  
  111. void REALLockObject(REALobject obj);
  112.  
  113. void REALUnlockObject(REALobject obj);
  114.  
  115. void REALLockString(REALstring str);
  116.  
  117. void REALUnlockString(REALstring str);
  118.  
  119. REALproc REALInterfaceRoutine(REALobject obj, const char *interfaceName, const char *methodName);
  120.  
  121. #if TARGET_68K || TARGET_PPC || TARGET_CARBON
  122. REALpicture REALBuildPictureFromPicHandle(PicHandle pic, Boolean bPassOwnership);
  123. #endif
  124.  
  125. #if TARGET_68K || TARGET_PPC || TARGET_CARBON
  126. REALpicture REALBuildPictureFromGWorld(GWorldPtr world, Boolean bPassOwnership);
  127. #endif
  128.  
  129. REALpicture REALBuildPictureFromPictureDescription(REALpictureDescription *description, Boolean bPassOwnership);
  130.  
  131. void REALLockPictureDescription(REALpicture pic, REALpictureDescription *description);
  132.  
  133. void REALUnlockPictureDescription(REALpicture pic);
  134.  
  135. void REALLockSoundDescription(REALsound sound, REALsoundDescription *description);
  136.  
  137. void REALUnlockSoundDescription(REALsound sound);
  138.  
  139. void REALPictureClearCache(REALpicture pic);
  140.  
  141. #if TARGET_WIN32
  142. void REALDrawPicturePrimitive(HDC hDC, REALpicture pic, const Rect *rBounds, int bTransparent);
  143. #endif
  144.  
  145. #if TARGET_68K || TARGET_PPC || TARGET_CARBON
  146. void REALDrawPicturePrimitive(REALpicture pic, const Rect *rBounds, int bTransparent);
  147. #endif
  148.  
  149. REALdbCursor REALdbCursorFromDBCursor(dbCursor *cursor, REALdbCursorDefinition *defn);
  150.  
  151. REALdbDatabase REALdbDatabaseFromDBDatabase(dbDatabase *database, REALdbEngineDefinition *defn);
  152.  
  153. void *REALGetEventInstance(REALcontrolInstance instance, REALevent *event);
  154.  
  155. #if TARGET_68K || TARGET_PPC || TARGET_CARBON
  156. void REALRegisterEventFilter(REALEventCallback callback, long param);
  157. #endif
  158.  
  159. void *REALGetControlData(REALcontrolInstance instance, REALcontrol *defn);
  160.  
  161. void *REALGetClassData(REALobject instance, REALclassDefinition *defn);
  162.  
  163. void REALGetControlBounds(REALcontrolInstance instance, Rect *rBounds);
  164.  
  165. long REALGetControlVisible(REALcontrolInstance instance);
  166.  
  167. Boolean REALGetControlEnabled(REALcontrolInstance instance);
  168.  
  169. void REALSetControlVisible(REALcontrolInstance instance, unsigned long visible);
  170.  
  171. REALgraphics REALGetControlGraphics(REALcontrolInstance instance);
  172.  
  173. #if TARGET_WIN32
  174. int REALGetWin32Charset(void);
  175. #endif
  176.  
  177. #if TARGET_WIN32
  178. REALfolderItem REALFolderItemFromPath(const char *path);
  179. #endif
  180.  
  181. #if TARGET_68K || TARGET_PPC || TARGET_CARBON
  182. REALfolderItem REALFolderItemFromFSSpec(const FSSpec *spec);
  183. #endif
  184.  
  185. #if TARGET_68K || TARGET_PPC || TARGET_CARBON
  186. Boolean REALFSSpecFromFolderItem(FSSpec *spec, REALfolderItem item);
  187. #endif
  188.  
  189. REALstring REALpathFromFolderItem(REALfolderItem item);
  190.  
  191. #if TARGET_WIN32
  192. HDC REALGraphicsDC(REALgraphics context);
  193. #endif
  194.  
  195. #if TARGET_WIN32
  196. HWND REALGetControlHWND(REALcontrolInstance control);
  197. #endif
  198.  
  199. #if TARGET_68K || TARGET_PPC || TARGET_CARBON
  200. void REALSelectGraphics(REALgraphics context);
  201. #endif
  202.  
  203. #if TARGET_68K || TARGET_PPC || TARGET_CARBON
  204. void REALGraphicsDrawOffscreenMacControl(REALgraphics context, ControlHandle mh);
  205. #endif
  206.  
  207. void REALInvalidateControl(REALcontrolInstance instance);
  208.  
  209. void REALInvalidateControlRect(REALcontrolInstance instance, int left, int top, int right, int bottom);
  210.  
  211. #if TARGET_WIN32
  212. void REALSetSpecialBackground(REALcontrolInstance instance, COLORREF *pcolor);
  213. #endif
  214.  
  215. #if TARGET_68K || TARGET_PPC || TARGET_CARBON
  216. void REALSetSpecialBackground(REALcontrolInstance instance);
  217. #endif
  218.  
  219. REALwindow REALGetControlWindow(REALcontrolInstance instance);
  220.  
  221. #if TARGET_68K || TARGET_PPC || TARGET_CARBON
  222. REALsound REALBuildSoundFromHandle(Handle sound, Boolean bPassOwnership);
  223. #endif
  224.  
  225. #if TARGET_68K || TARGET_PPC || TARGET_CARBON
  226. REALappleEvent REALBuildAppleEvent(const AppleEvent *event, Boolean bPassOwnership);
  227. #endif
  228.  
  229. #if TARGET_68K || TARGET_PPC || TARGET_CARBON
  230. REALappleEvent REALBuildAEDescList(const AppleEvent *event, Boolean bPassOwnership);
  231. #endif
  232.  
  233. #if TARGET_68K || TARGET_PPC || TARGET_CARBON
  234. REALappleEvent REALBuildAEObjSpecifier(const AppleEvent *event, Boolean bPassOwnership);
  235. #endif
  236.  
  237. #if TARGET_68K || TARGET_PPC || TARGET_CARBON
  238. AppleEvent *REALAccessAppleEvent(REALappleEvent event);
  239. #endif
  240.  
  241. #if TARGET_68K || TARGET_PPC || TARGET_CARBON
  242. AppleEvent *REALAccessAppleEventReply(REALappleEvent event);
  243. #endif
  244.  
  245. #if TARGET_68K || TARGET_PPC || TARGET_CARBON
  246. WindowPtr REALGetWindowHandle(REALwindow window);
  247. #endif
  248.  
  249. #if TARGET_68K || TARGET_PPC || TARGET_CARBON
  250. ControlHandle REALGetControlHandle(REALcontrolInstance control);
  251. #endif
  252.  
  253. #if TARGET_68K || TARGET_PPC || TARGET_CARBON
  254. MenuHandle REALGetPopupMenuHandle(REALpopupMenu popup);
  255. #endif
  256.  
  257. QT::MovieController REALgetMoviePlayerController(REALmoviePlayer instance);
  258.  
  259. QT::Movie REALgetMovieMovie(REALmovie instance);
  260.  
  261. #if TARGET_68K || TARGET_PPC || TARGET_CARBON
  262. REALmovie REALbuildMovie(QT::Movie movie, int resRefNum, int bNew);
  263. #endif
  264.  
  265. #if TARGET_68K || TARGET_PPC || TARGET_CARBON
  266. void REALmarkMovieDirty(REALmovie movie);
  267. #endif
  268.  
  269. int REALenterMovies(void);
  270.  
  271. REALobject REALnewInstance(const char *className);
  272.  
  273. void REALMarkSocketUsage(void);
  274.  
  275. void REALSocketConnect(REALsocket socket, REALstring address, int port);
  276.  
  277. void REALSocketClose(REALsocket socket);
  278.  
  279. REALstring REALSocketReadAll(REALsocket socket);
  280.  
  281. REALstring REALSocketRead(REALsocket socket, int count);
  282.  
  283. void REALSocketWrite(REALsocket socket, REALstring data);
  284.  
  285. int REALSocketLastErrorCode(REALsocket socket, int unused);
  286.  
  287. REALstring REALSocketLookahead(REALsocket socket, int unused);
  288.  
  289. REALstring REALSocketLocalAddressGetter(REALsocket socket, int unused);
  290.  
  291. void REALSocketPoll(REALsocket socket);
  292.  
  293. int REALSocketGetEvents(REALsocket socket, int unused);
  294.  
  295. void REALRegisterDataSourceInterface(const char *szMenuName, REALDataSourceInterfaceProc proc);
  296.  
  297. void REALRegisterDataSource(const char *szDatasourceName, REALDataSourceProc proc);
  298.  
  299. void REALDesignAddDataSource(const char *baseName, const char *szDataSourceName, Ptr data, int dataLen);
  300.  
  301. void REALMessageBox(REALstring text);
  302.  
  303. #if TARGET_WIN32
  304. REALpicture REALBuildPictureFromDIB(HANDLE hDIB, Boolean bPassOwnership);
  305. #endif
  306.  
  307. void REALSetControlEnabled(REALcontrolInstance instance, long unused, Boolean enable);
  308.  
  309. long REALGetControlPosition(REALcontrolInstance instance, long which);
  310.  
  311. void REALSetControlPosition(REALcontrolInstance instance, long which, long value);
  312.  
  313. #if TARGET_68K || TARGET_PPC || TARGET_CARBON
  314. void REALRefreshWindow(unsigned long macWindowPtr);
  315. #endif
  316.  
  317. REALgraphics REALGetPictureGraphics(REALpicture picture);
  318.  
  319. REALpicture REALNewPicture(long width, long height, long depth);
  320.  
  321. REALmemoryBlock REALNewMemoryBlock(int bytes);
  322.  
  323. void*REALMemoryBlockGetPtr(REALmemoryBlock memBlock);
  324.  
  325. int REALMemoryBlockGetSize(REALmemoryBlock memBlock);
  326.  
  327. REALmemoryBlock REALPtrToMemoryBlock(void*data);
  328.  
  329. #if TARGET_WIN32
  330. void REALSetAccelerator(REALcontrolInstance instance, REALstring key);
  331. #endif
  332.  
  333. // **** Autogenerated code from Plugin API Manager ends here ****
  334. // **************** Do not edit above this line *****************
  335.  
  336. long REALstringToOSType(REALstring id);
  337.  
  338. #endif
  339.